<include file="Public:header" />
<div class="container main"> <include file="Public:left" />
  <div class="w790">
    <div class="h">
      <form action="" method="get" class="fr form-inline">
        <select name="category_id" class="form-control">
          <option value="0">请选择分类</option>
          <volist name="categoryList" id="vo"> <option 
            <eq name="category_id" value="$vo['id']">selected="selected"</eq>
             value="{$vo.id}">{$vo.title}
            </option>
          </volist>
        </select>
        <input type="hidden" name="pagesize" value="{$pagesize}" />
        <input type="text" name="keywords" value="{$keywords}" class="form-control" />
        <button type="submit" class="btn btn-default">搜索</button>
      </form>
    </div>
    <div class="table_">
      <table class="table table-bordered" width="100%" border="0" cellspacing="0" cellpadding="0">
        <thead>
          <tr>
            <td align="center">ID</td>
            <td align="center">名称</td> 
            <td align="center">图片</td>
            <td align="center">商品分类</td>
           
            <td align="center">价格</td>
            <td align="center">成本</td>
            <td align="center">库存</td>
            <td align="center">排序</td>
            <td align="center">操作</td>
          </tr>
        </thead>
        <volist name="list" id="vo">
          <tr class="data_list">
            <td align="center"><input type="checkbox" name="id" id="id" class="sall" value="{$vo.id}" />
              {$vo.id}</td>
            <td> <span class="ajaxText" tablename="Product" field="title" id="{$vo.id}" val="{$vo.title}">{$vo.title}</span></td>
            <td><img src="{:getThumbPath($vo['img_url'])}" width="50" /></td>
            <td align="center">{$vo.category_name}</td>
            
            <td align="center">
            <span class="ajaxText" tablename="Product" field="price" id="{$vo.id}" val="{$vo.price}">{$vo.price}</span>
            </td>
            <td align="center">
                   <span class="ajaxText" tablename="Product" field="cost" id="{$vo.id}" val="{$vo.cost}">{$vo.cost}</span>
            </td>
            <td align="center">
            
            
            <span class="ajaxText" tablename="Product" field="stocks" id="{$vo.id}" val="{$vo.stocks}">{$vo.stocks}</span>
            
             
           
            </td>
            <td align="center"><input name="sort" width="30" type="text" value="{$vo.sort}" size="4" />
              <a href="javascript:void(0);" onclick="update_sortClick('id','up',this,'sort','{:U('dosort')}');">上</a><a href="javascript:void(0);" onclick="update_sortClick('id','',this,'sort','{:U('dosort')}');">下</a></td>
            <td align="center">添加到订单中</td>
          </tr>
        </volist>
      </table>
     <div class="pages">
        <div class="controlList fl">

          <form class="fr" style="display:inline;" id="pagesize" action="" method="get">
         <label class="form-inline" > 每页
          <select name="pagesize" onchange="document.getElementById('pagesize').submit();" class="form-control">
            <option 
            <eq name="pagesize" value="10">selected="selected"</eq>
             value="10">10
            </option>
            <option 
            <eq name="pagesize" value="20">selected="selected"</eq>
             value="20">20
            </option>
            <option 
            <eq name="pagesize" value="30">selected="selected"</eq>
             value="30">30
            </option>
            <option 
            <eq name="pagesize" value="50">selected="selected"</eq>
             value="50">50
            </option>
            <option 
            <eq name="pagesize" value="100">selected="selected"</eq>
             value="100">100
            </option>
            <option 
            <eq name="pagesize" value="500">selected="selected"</eq>
             value="500">500
            </option>
          </select>
          条</label>
          <input type="hidden" name="category_id" value="{$category_id}" />
          <input type="hidden" name="keywords" value="{$keywords}" />
        </form>
        <div class="fr">{$pages}</div>
      </div>
    </div>
  </div>
  <div class="clear"></div>
</div>
<include file="Public:footer" />